Maggeo: add ability to write 8859-1. Disbaled for now as firmware is too new to...
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Tue, 10 Jan 2006 21:13:38 +0000 (21:13 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Tue, 10 Jan 2006 21:13:38 +0000 (21:13 +0000)
gpsbabel/maggeo.c

index 8fb3d43ca76628c6ff45710b8c848b117fc02fc3..bb645f622f4fcc11a53bf5531121e3750a68b33a 100644 (file)
@@ -26,6 +26,9 @@
 
 #define MYNAME "maggeo"
 
+/* Turn this on (remove) after 5.2 becomes widespread. */
+#define FIRMWARE_DOES_88591 0          
+
 static FILE *maggeofile_in;
 static FILE *maggeofile_out;
 static short_handle desc_handle = NULL;
@@ -113,7 +116,12 @@ append(char *buf, const char *str)
        }
 
        cleansed1 = xstrdup(str);
+#if FIRMWARE_DOES_88591
+/* Actually, this function needs needs refactored... */
+       cleansed2 = xstrdup(cleansed1);
+#else
        cleansed2 = m330_cleanse(cleansed1);
+#endif
 
        strcat(buf, cleansed2);
 
@@ -220,5 +228,9 @@ ff_vecs_t maggeo_vecs = {
        maggeo_write,
        NULL,
        NULL,
+#if FIRMWARE_DOES_88591
+       CET_CHARSET_LATIN1, 0   /* CET-REVIEW */
+#else
        CET_CHARSET_ASCII, 0    /* CET-REVIEW */
+#endif
 };